package com.modai.springcloud.service.impl;

import com.modai.springcloud.dao.StorageDao;
import com.modai.springcloud.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author ：modai
 * @date ：Created in 2020-12-21 11:49
 * @description：
 */
@Service
@Slf4j
public class StorageServiceImpl implements StorageService {

    @Resource
    private StorageDao storageDao;

    @Override
    public void decrease(long productId, int count) {
        log.info("开始扣减库存");
        storageDao.decrease(productId,count);
        log.info("扣减库存数为：{}",count);
    }
}
